//
//  FQDQIconEmptyCell.m
//  FakeQDaily
//
//  Created by mewxiv on 9/27/16.
//  Copyright © 2016 Xensius. All rights reserved.
//

#import "FQDQIconEmptyCell.h"
#import "FQDQIconEmptyView.h"

@interface FQDQIconEmptyCell ()

@property (nonatomic, strong) FQDQIconEmptyView *emptyView;

@end

@implementation FQDQIconEmptyCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self prepareCell];
    }
    return self;
}

- (void)layoutSubviews
{
    [self updateCell];
}

- (void)prepareCell
{
    _emptyView = [[FQDQIconEmptyView alloc] initWithFrame:self.bounds];
    [self.contentView addSubview:_emptyView];
}

- (void)updateCell
{
    self.emptyView.frame = self.bounds;
}

- (void)setTitleText:(NSString *)titleText
{
    self.emptyView.titleText = titleText;
}

- (NSString *)titleText
{
    return self.emptyView.titleText;
}

+ (NSString *)reuseId
{
    return @"FQDQIconEmptyCell";
}

@end
